<?php /* Smarty version Smarty-3.0.6, created on 2018-05-02 11:37:30
         compiled from "/home/user08/dingwei/temp/default/redpack.htm" */ ?>
<?php /*%%SmartyHeaderCode:10690474055ae9327abee499-45900845%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '478bb4c5b9ee177fbc0fac0c3a31776e54c4041a' => 
    array (
      0 => '/home/user08/dingwei/temp/default/redpack.htm',
      1 => 1524619840,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '10690474055ae9327abee499-45900845',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/temp/default/js/jquery-3.1.0.min.js"></script>
    <script src="/temp/default/js/flexible.debug.js"></script>
    <script src="/temp/default/js/flexible_css.debug.js"></script>
    <link rel="stylesheet" href="/temp/default/css/redPack.css">
    <title>福利大抽奖</title>
</head>
<body>
    <div class="container">
        <form method="post" action="index.php">
        <img src="/temp/default/image/code.jpg" alt="" class="logo" />
        <input type="hidden" id="userid" name="userid" value="<?php echo $_smarty_tpl->getVariable('userid')->value;?>
">
            <input type="hidden" name="action" value="order">
        <div class="money-box">
            选择金额(元)
        </div>
        <ul class="choose" id="choose">
            <li class="item" value=1.08>￥1.08</li>
            <li class="item" value="1.28">￥1.28</li>
            <li class="item" value="1.38">￥1.38</li>
            <li class="item" value="1.88">￥1.88</li>
        </ul>
            <input type="hidden" name="cost" value="" id="cost">
        <textarea cols="30" rows="5" placeholder="说点什么..." class="desc" id="description"></textarea>
        <input type="submit" value="塞进红包" class="send" onclick="send()"/>
        <input type="button" value="发送记录" class="record" onclick="javascript:;location.href='index.php?action=record&userid=<?php echo $_smarty_tpl->getVariable('userid')->value;?>
'"/>
        <!-- <footer>
            <p class="infer">娱乐有度 勿侵隐私</p>
            <p class="anounce">技术支持 @ 拼多多红包技术团队</p>
        </footer> -->
        </form>
    </div>
    <script>
        $('#choose').click(function(event){
            reset();
            $(event.target).addClass('selected');
            $(this).attr('value',$(event.target).text().split('￥')[1]);
            $('#cost').val($(event.target).text().split('￥')[1]);
        });
        function reset(){
            var list = $('#choose').find('li');
            for ( var i = 0; i < list.length; i++) {
                $(list[i])[0].className = 'item';
            }
        }
        function send(){
            var price = Number($('#choose').attr('value'));
            var desc = $('#description').val();
            var userid = $('#userid').val();
            if(!price){
                alert("红包金额不能为空！");
                return false;
            }
        }
    </script>
</body>
</html>